import http from "../request";
const apibase = "/api/User";

//登录
var login = function (data) {
  return new Promise((resolve, reject) => {
    http
      .post(apibase + `/Login`, data)
      .then((res) => {
        resolve(res);
      })
      .catch((error) => {
        reject(error);
      });
  });
};
//修改密码
var modifyPassword = function (data) {
  return new Promise((resolve, reject) => {
    http
      .post(apibase + `/ModifyPassword`, data)
      .then((res) => {
        resolve(res);
      })
      .catch((error) => {
        reject(error);
      });
  });
};

export { login,modifyPassword };
